package com.mashibing.tank;

import java.io.IOException;
import java.util.Properties;

/**
 * Copyright (C) 2024 - 2024 Jasonakeke， Inc. All Rights Reserved
 *
 * @Desc :
 * @Time : 2024/11/2 22:21
 * @Author : Code_By_Jasonakeke
 * @Email : 2284037977@qq.com
 * @Class : PropertyMgr
 * @IDE : IntelliJ IDEA
 */
public class PropertyMgr {

	private static Properties props = new Properties();

	static {
		try {
			props.load(PropertyMgr.class.getClassLoader().getResourceAsStream("config.properties"));
		} catch (IOException e) {
			e.printStackTrace();
		}
	}

	public static Object get(String key) {
		if (props == null) {
			return null;
		}
		return props.get(key);
	}

	public static void main(String[] args) {
		System.out.println(PropertyMgr.get("initTankCount"));
	}
}
